package com.seeyon.apps.thirdapp.sso;



import com.seeyon.ctp.portal.sso.SSOLoginHandshakeAbstract;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import www.seeyon.com.utils.Base64Util;

public class ThirdAppSsoLoginHandshake extends SSOLoginHandshakeAbstract {

	Log log = LogFactory.getLog(ThirdAppSsoLoginHandshake.class);

	@Override
	public String handshake(String ticket) {
		log.info("接收到的ticket："+ticket);
		if(ticket==null||ticket.equals("")) {
            return null;
        }
		//2022-07-26 王巧明 · PC蓝信消息穿透时单点ticket解析
		return Base64Util.decode(ticket).split("-_-")[0];
        //return ticket.substring(0, ticket.length()-1);
	}
	

	@Override
	public void logoutNotify(String arg0) {
		
	}

}
